package lab02.test05;

public class Cube {

    private int length;
    private int width;
    private int high;

    public void setLength(int length) {
        this.length = length;
    }

    public int getLength() {
        return length;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getWidth() {
        return width;
    }

    public void setHigh(int high) {
        this.high = high;
    }

    public int getHigh() {
        return high;
    }

    public int cubage() {
        int cubage = getLength() * getWidth() * getHigh();
        return cubage;
    }

    public void output() {
        System.out.println("长为：" + getLength() + " 宽为：" + getWidth() + " 高为：" + getHigh());
        System.out.println("体积为：" + cubage());
    }
}
